use crate::domain;
use salvo::prelude::*;
use crate::extends::jwt::create_jwt_auth_handler ;
pub fn create_router() -> Router {
//jwt验证中间件
let jwthandler =create_jwt_auth_handler();
    
    Router::new()
        .push(
            Router::new().path("adminUser").push(
                Router::new()
                    .path("profile")
                    //当前用户状态
                    .get(domain::user::handler::profile),
            ).push(
                Router::new()
                    .path("name")
                    //修改别名
                    .put(domain::user::handler::edit_name),
            ),
        ).before(jwthandler)
}
